package net.monkeybros.sbus.model;

import com.neurospeech.wsclient.*;
import org.w3c.dom.*;

public class InfoSublinea extends WSObject
{
	
	private Integer _sublinea;
	public Integer getsublinea(){
		return _sublinea;
	}
	public void setsublinea(Integer value){
		_sublinea = value;
	}
	private String _nombre;
	public String getnombre(){
		return _nombre;
	}
	public void setnombre(String value){
		_nombre = value;
	}
	
	public static InfoSublinea loadFrom(Element root) throws Exception
	{
		if(root==null){
			return null;
		}
		InfoSublinea result = new InfoSublinea();
		result.load(root);
		return result;
	}
	
	
	protected void load(Element root) throws Exception
	{
		this.setsublinea(WSHelper.getInteger(root,"sublinea",false));
		this.setnombre(WSHelper.getString(root,"nombre",false));
	}
	
	
	
	public Element toXMLElement(Element root)
	{
		Element e = root.getOwnerDocument().createElement("InfoSublinea");
		fillXML(e);
		return e;
	}
	
	public void fillXML(Element e)
	{
		WSHelper.addChild(e,"sublinea",String.valueOf(_sublinea),false);
		if(_nombre!=null)
			WSHelper.addChild(e,"nombre",String.valueOf(_nombre),false);
	}
	
}
